package cn.tedu.pojo;

import java.util.Date;
//封装emp表里  每个字段的值
public class Emp {
    //属性类型必须和数据库里的字段类型一致，属性名称必须和数据库里的字段名称一致
    private int id;
    private String ename;
    private String job;
    private double mgr;
    private Date hiredate;
    private double sal;
    private double comn;
    private int deptno;

    public Emp() {
    }

    public Emp(int id, String ename, String job,
               int mgr, Date hiredate, double sal,
               double comn, int deptno) {
        this.id = id;
        this.ename = ename;
        this.job = job;
        this.mgr = mgr;
        this.hiredate = hiredate;
        this.sal = sal;
        this.comn = comn;
        this.deptno = deptno;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getEname() {
        return ename;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public double getMgr() {
        return mgr;
    }

    public void setMgr(int mgr) {
        this.mgr = mgr;
    }

    public Date getHiredate() {
        return hiredate;
    }

    public void setHiredate(Date hiredate) {
        this.hiredate = hiredate;
    }

    public double getSal() {
        return sal;
    }

    public void setSal(double sal) {
        this.sal = sal;
    }

    public double getComn() {
        return comn;
    }

    public void setComn(double comn) {
        this.comn = comn;
    }

    public int getDeptno() {
        return deptno;
    }

    public void setDeptno(int deptno) {
        this.deptno = deptno;
    }

    @Override
    public String toString() {
        return "Emp{" +
                "id=" + id +
                ", ename='" + ename + '\'' +
                ", job='" + job + '\'' +
                ", mgr=" + mgr +
                ", hiredate=" + hiredate +
                ", sal=" + sal +
                ", comn=" + comn +
                ", deptno=" + deptno +
                '}';
    }
}
